<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>顶部导航条</title>
</head>
<link rel="stylesheet" href="./reset.css">
<link rel="stylesheet" href="./fa/css/all.css">
<style>
     .clearfit::before,
        .clearfit::after{
                content: "";
                display: table;
                clear: both;
            }


    body{
        font-size: 12px;
    }

    .top-bar-wrapper{
        widows: 100%;
        height: 30px;
        background-color: #E3E4E5;
        line-height: 30px;
        border: 1px solid #ddd;
    }

    /*设置字体样式*/
    .top-bar a, .top-bar span, .top-bar i,.city_list li{
        color: #999;
        text-decoration: none;
        list-style: none;
    }

    .top-bar a:hover,
    .top-bar .highlight{
        color: #f10215;
    }

    .top-bar{
        width: 1190px;
        margin: 0 auto;
    }

    .location{
        float: left;
    }

    .location .fas{
        color: #f10215;
    }

    /*城市下拉框*/
    .location .city_list{
        display: none;
        width: 88px;
        height: 260px;
        background-color: white;
        border: 1px solid rgb(204, 204, 204);
        position: absolute;  /*设置绝对定位，使其不占据页面的位置*/
        top: 31px;
        z-index: 999;
        box-shadow: 0 2px 2px rgba(0, 0, 0, .2);
    }

    .location:hover .city_list{
        display: block;
    }
    /*原始化current-city*/
    .current-city{
        padding: 0 10px;
        position: relative;
        border: 1px solid transparent;
        z-index: 99999;
    }

    /*设置current-city移入的效果*/
    .location:hover .current-city{
        background-color: white;
        border: 1px solid rgb(204, 204, 204);
        border-bottom: none;
        padding-bottom: 1px;
    }

    /*右导航栏*/
    .shortcut{
        float: right;
    }

    .shortcut .line{
        width: 1px;
        height: 10px;
        background-color: #999;
        margin: 10px 12px;
    }

    .shortcut li{
        float: left;
    }
</style>

<body>
    <!-- 外围容器 -->
    <div class="top-bar-wrapper clearfit">
        <!-- 内部容器 -->
        <div class="top-bar">
            <div class="location">
                <div class="current-city">
                    <i class="fas fa-map-marker-alt"></i>
                <a href="javascript:;">浙江</a>
                 </div>

                 <div class="city_list">
                     <li>杭州</li>
                     <li>宁波</li>
                     <li>温州</li>
                     <li>绍兴</li>
                     <li>湖州</li>
                     <li>嘉兴</li>
                     <li>金华</li>
                     <li>台州</li>
                     <li>丽水</li>
                     
                 </div>
            </div>
            <ul class="shortcut clearfit">
                <li>
                    <a href="javascript:;">你好,请登录</a>
                    <a class="highlight" href="javascript:;">免费注册</a>
                </li>

                <li class="line"></li>

                <li><a href="javascript:;">我的订单</a></li>

                <li class="line"></li>
                <li>
                    <a href="javascript:;">我的京东</a>
                    <i class="fas fa-angle-down"></i>
                </li>

                <li class="line"></li>
                <li><a href="javascript:;">京东会员</a></li>

                <li class="line"></li>
                <li>
                    <a class="highlight" href="javascript:;">企业采购</a>
                    <i class="fas fa-angle-down"></i>
                </li>

                <li class="line"></li>
                <li>
                    <span>客户服务</span>
                    <i class="fas fa-angle-down"></i>
                </li>

                <li class="line"></li>
                <li>
                    <span>网站导航</span>
                    <i class="fas fa-angle-down"></i>
                </li>

                <li class="line"></li>
                <li>
                    <span>手机京东</span>
                </li>



            </ul>


        </div>
    </div>


</body>

</html>